else { if } makes no sense
authorNiklas Laxström <niklas.laxstrom@gmail.com>
Fri, 5 Oct 2012 07:29:36 +0000 (07:29 +0000)
committerNiklas Laxström <niklas.laxstrom@gmail.com>
Fri, 5 Oct 2012 07:32:52 +0000 (07:32 +0000)
I complained about this in gerrit but looks like my
comment was not saved

Change-Id: Ie570bdaf89e93628de730102587064ee0495fb1b

includes/db/Database.php

index c082cc9..0a51f49 100644 (file)
@@ -2925,11 +2925,9 @@ abstract class DatabaseBase implements DatabaseType {
                                //    started and comitted.
                                wfWarn( "$fname: Transaction already in progress (from {$this->mTrxFname}), " .
                                        " performing implicit commit!" );
-                       } else {
-                               if ( $wgDebugDBTransactions ) {
-                                       wfDebug( "$fname: Transaction already in progress (from {$this->mTrxFname}), " .
-                                               " performing implicit commit!\n" );
-                               }
+                       } elseif ( $wgDebugDBTransactions ) {
+                               wfDebug( "$fname: Transaction already in progress (from {$this->mTrxFname}), " .
+                                       " performing implicit commit!\n" );
                        }
 
                        $this->doCommit( $fname );